﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container-fluid">
	<div class="navbar-header">
	<a class="navbar-brand" href="#">
            <img alt="Brand" width="20" height="20" src="">
          </a>
		<button type="button" class="navbar-toggle collapsed"
			data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
			<span class="icon-bar"></span>
		</button>
		<a class="navbar-brand" style="color:#fff;">${site.name}</a>
	</div>
	<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
		<ul class="nav navbar-nav navbar-right">
			<c:choose>
				<c:when test="${empty singups}">
					<c:choose>
						<c:when test="${empty site.siteCode}">
							<li class="active">
								<a href="<%=basePath%>d_${site.memberId}.do"><span
									class="glyphicon glyphicon-home"></span> 首页</a>
							</li>
						</c:when>
						<c:otherwise>
							<li class="active">
								<a href="<%=basePath%>d_${site.siteCode}.do"><span
									class="glyphicon glyphicon-home"></span> 首页</a>
							</li>
						</c:otherwise>
					</c:choose>
				</c:when>
				<c:otherwise>
					<li class="active">
						<a data-toggle="modal" data-target="#bm_list_model"
							style="cursor: pointer;"><span
							class="glyphicon glyphicon-align-justify"></span> 所有报名</a>
					</li>
				</c:otherwise>
			</c:choose>
		</ul>
	</div>
</div>
</nav>
<div class="modal fade" id="bm_list_model" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
				</button>
				<h4 class="modal-title">
					所有报名
				</h4>
			</div>
			<div class="modal-body">
				<table class="table table-hover">
					<thead>
						<tr>
							<th>
								@
							</th>
							<th>
								报名列表
							</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${singups}" var="sing" varStatus="state">
							<tr>
								<td>
									${state.index + 1}
								</td>
								<td>
									<a class="name" href="<%=basePath%>s_${sing.id }.do">${sing.title}</a>
								</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">
					关闭
				</button>
			</div>
		</div>
	</div>
</div>
